
#ifndef LEXIC_UNIT_H

#define LEXIC_UNIT_H

// Lexic units types
enum LexicUnitType
{
	LUTypeKeyword,
	LUTypeOperator,
	LUTypeSpecialCharacter,
	LUTypeConstantBool,
	LUTypeConstantInteger,
	LUTypeConstantFloat,
	LUTypeConstantString, // TODO
	LUTypeIdentifier,
	LUTypeSpecialType    
	// They are 2 special types: endOfFile, endOfProject
	// and they are used to distinguish files in gpss++ project
	// and to determine the end of gpss++ project

};

enum SpecialType
{
	endOfFile,
	endOfProject
};

// Predefined lexic units
enum Keywords
{
   
	KeywordUsing,
	KeywordAs,
	KeywordNamespace,
	KeywordInt,
	KeywordFloat,
	KeywordBool,
	KeywordState,
	KeywordTime,
	KeywordVoid,
	KeywordFacility,
	KeywordStorage,
	KeywordQueue,
	KeywordADTable,
	KeywordGroup, //
	KeywordOutputStream,
	KeywordEnum,
	KeywordClass,
	KeywordAbstract,
	KeywordPublic,
	KeywordPrivate,
	KeywordProtected,
	KeywordTemplate,
	KeywordConst,
	KeywordStatic,
	KeywordOverride,
	KeywordVirtual,
	KeywordFinal,
	KeywordRead,
	KeywordWrite,
	KeywordStart,
	KeywordProcess,
	KeywordIf,
	KeywordElse,
	KeywordSwitch,
	KeywordCase,
	KeywordDefault,
	KeywordWhile,
	KeywordDo,
	KeywordFor,
	KeywordBreak,
	KeywordContinue,
	KeywordGoto,
	KeywordReturn,
	KeywordWith,
	KeywordStop,
	KeywordDerivation,
	KeywordNumeric,
	KeywordDiscrete,
	KeywordContinuous,
	KeywordINF,
	KeywordModel,
	KeywordIn,
	KeywordOut,
	KeywordDefine,
	KeywordGenerate,
	KeywordUpto,
	KeywordAfter,
	KeywordEvery,
	KeywordTerminate,
	KeywordAdvance,
	KeywordEnter,
	KeywordUnits,
	KeywordForming,
	KeywordLeave,
	KeywordFrom,
	KeywordSeize,
	KeywordRelease,
	KeywordInqueue,
	KeywordOutqueue,
	KeywordArrive,
	KeywordDepart,
	KeywordWait,
	KeywordOn,
	KeywordUntil,
	KeywordThen,
	KeywordTimeout,
	KeywordJoin,
	KeywordGroupLower, // BLAAAAAAAA
	KeywordCreate,
	KeywordSend,
	KeywordTo,
	KeywordSplit,
	KeywordInto,
	KeywordGather,
	KeywordAnd,
	KeywordDestroy,
	KeywordExecute,
	KeywordExec,
	KeywordSimulation,
	KeywordConfiguration,
	KeywordRun,
	KeywordSimulations,
	KeywordClear,
	KeywordReset,
	KeywordNull,
	KeywordNew,
	KeywordInstance,
	KeywordOf,
   KeywordTrace
	//KeywordEndOfFile // TODO provjeriti s onim dolje
};



enum Operators
{
   OperatorAddition, // +
   OperatorSubtraction, // -
   OperatorNegation, // -
   OperatorMultiplication, // *
   OperatorDivision, // /
   OperatorModulus, // %
   OperatorExponentiation, // ^
   OperatorNot, // !
   OperatorAssigment, // =
   OperatorEqual, // ==
   OperatorNotEqual, // !=
   OperatorLessThan,  // <
   OperatorGreaterThan, // >
   OperatorLessThanOrEqualTo, // <=
   OperatorGreaterThanEqualTo, // >=
   OperatorAnd, // &&
   OperatorOr, // ||
   OperatorXor //^^
};


enum SpecialCharacters
{	
   SpecialCharacterSemicolon, // ;
   SpecialCharacterLeftSquareBracket, // [
   SpecialCharacterRightSquareBracket, // ] 
   SpecialCharacterPlusOrMinus, // +-
   SpecialCharacterLeftParenthesis, // (
   SpecialCharacterRightParenthesis, // ) 
   SpecialCharacterComma, // ,
   SpecialCharacterPeriod, //.
   SpecialCharacterColon, //:
   SpecialCharacterLeftCurlyBrace, // {
   SpecialCharacterRightCurlyBrace, // }
   SpecialCharacterTheArrowOperator // ->
};


// TODO table of constants


// TODO table of identifiers


// TODO lexic unit structure
struct LexicUnit
{

	int id;
	LexicUnitType type;
	int subtype;
	int sourceFileId;
	int sourceLineId;
	int sourceColumnId;
};


#endif


